/**
 * api管理
 */
import ask from '@/utils/request.js'

export default {
	//用户登录
	login(params,token){
		return ask.request({
			url: '/user/login',
			method: 'GET',
			data: params
		},token)
	},
	//修改密码
	setpassword(params,token){
		return ask.request({
			url: '/user/updatePassword',
			method: 'POST',
			data: params
		},token)
	},
	//获取用户协议
	getUserAgreement(params,token){
		return ask.request({
			url: '/agreement/getAgreementInfo',
			method: 'GET',
			data: params
		},token)
	},
	//在途打卡
	roadPunch(params,token){
		return ask.request({
			url: '/wayCardrecord/punchWay',
			method: 'POST',
			data: params
		},token)
	},
	//楼宇打卡
	buildingPunch(params,token){
		return ask.request({
			url: '/buildingCardrecord/punchBuilding',
			method: 'POST',
			data: params
		},token)
	},
	//获取所有楼宇名称及拜访次数
	getALLbuilding(params,token){
		return ask.request({
			url: '/building/getAllBuildingAndVisit',
			method: 'GET',
			data: params
		},token)
	},
	//获取打卡数据统计
	getStatistics(params,token){
		return ask.request({
			url: '/cardrecord/getPunchDataStatistics',
			method: 'GET',
			data: params
		},token)
	},
	//获取详情信息
	getDetails(params,token){
		return ask.request({
			url: '/building/getBuildingInfoByLike',
			method: 'POST',
			data: params
		},token)
	},
	//获取统计楼宇的各个状态拜访次数及地理坐标
	getmark(params,token){
		return ask.request({
			url: '/building/getBuildingCountVisitsNumber',
			method: 'GET',
			data: params
		},token)
	},
	//获取所有楼宇状态列表
	getbuildingstate(params,token){
		return ask.request({
			url: '/building/getAllBuildingStatus',
			method: 'GET',
			data: params
		},token)
	},
	//获取微信信息
	getwx(params,token){
		return ask.request({
			url: '/user/getOpenId',
			method: 'POST',
			data: params
		},token)
	}
}